<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcoap: coap_io.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libcoap<span id="projectnumber">&#160;4.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('coap__io_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">coap_io.h</div></div>
</div><!--header-->
<div class="contents">
<a href="coap__io_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * coap_io.h -- Default network I/O functions for libcoap</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * Copyright (C) 2012-2013 Olaf Bergmann &lt;bergmann@tzi.org&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> *</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * This file is part of the CoAP library libcoap. Please see README for terms</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * of use.</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> */</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#ifndef COAP_IO_H_</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#define COAP_IO_H_</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &lt;assert.h&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &lt;sys/types.h&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &quot;<a class="code" href="address_8h.html">address.h</a>&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#ifndef COAP_RXBUFFER_SIZE</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a4434bb4fe30115db5ed5c458be4664f5">   19</a></span><span class="preprocessor">#define COAP_RXBUFFER_SIZE 1472</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#endif </span><span class="comment">/* COAP_RXBUFFER_SIZE */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#ifdef _WIN32</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="keyword">typedef</span> SOCKET <a class="code hl_typedef" href="coap__io_8h.html#acbbc3c3a8f035dd8078f47cfb78d91b9">coap_fd_t</a>;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#define coap_closesocket closesocket</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#define COAP_SOCKET_ERROR SOCKET_ERROR</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#define COAP_INVALID_SOCKET INVALID_SOCKET</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="coap__io_8h.html#acbbc3c3a8f035dd8078f47cfb78d91b9">   28</a></span><span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code hl_typedef" href="coap__io_8h.html#acbbc3c3a8f035dd8078f47cfb78d91b9">coap_fd_t</a>;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a1714f1a89b2028e391c788531287a628">   29</a></span><span class="preprocessor">#define coap_closesocket close</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a775127ad24f7ace262a4f6488bc2adb0">   30</a></span><span class="preprocessor">#define COAP_SOCKET_ERROR (-1)</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="coap__io_8h.html#affee46a155e202781751190507fbe0da">   31</a></span><span class="preprocessor">#define COAP_INVALID_SOCKET (-1)</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="keyword">struct </span><a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a>;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="keyword">struct </span><a class="code hl_struct" href="structcoap__session__t.html">coap_session_t</a>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="keyword">struct </span><a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a2500e6a3ae7b54965f78c2b73b3b5747">   38</a></span><span class="keyword">typedef</span> uint16_t <a class="code hl_typedef" href="coap__io_8h.html#a2500e6a3ae7b54965f78c2b73b3b5747">coap_socket_flags_t</a>;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="foldopen" id="foldopen00040" data-start="{" data-end="};">
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="structcoap__socket__t.html">   40</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="preprocessor">#if defined(WITH_LWIP)</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>  <span class="keyword">struct </span>udp_pcb *pcb;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">#elif defined(WITH_CONTIKI)</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>  <span class="keywordtype">void</span> *conn;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="structcoap__socket__t.html#a8b3fa70d071fdf5815bc33671b7c4f76">   46</a></span>  <a class="code hl_typedef" href="coap__io_8h.html#acbbc3c3a8f035dd8078f47cfb78d91b9">coap_fd_t</a> <a class="code hl_variable" href="structcoap__socket__t.html#a8b3fa70d071fdf5815bc33671b7c4f76">fd</a>;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="preprocessor">#endif </span><span class="comment">/* WITH_LWIP */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="structcoap__socket__t.html#afc857e7bf0427e0d08e2be5604bc5516">   48</a></span>  <a class="code hl_typedef" href="coap__io_8h.html#a2500e6a3ae7b54965f78c2b73b3b5747">coap_socket_flags_t</a> <a class="code hl_variable" href="structcoap__socket__t.html#afc857e7bf0427e0d08e2be5604bc5516">flags</a>;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="coap__io_8h.html#aeb2630e7dd4a2bca0fceb4e168853d57">   49</a></span>} <a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a>;</div>
</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="coap__io_8h.html#af88ca6b7683ad462a6187ccda018f75e">   54</a></span><span class="preprocessor">#define COAP_SOCKET_EMPTY        0x0000  </span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a3d4ed50cc653ac76015d00c1a9fac1ec">   55</a></span><span class="preprocessor">#define COAP_SOCKET_NOT_EMPTY    0x0001  </span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a4661ba56101390893cf9bdb5dbf5511b">   56</a></span><span class="preprocessor">#define COAP_SOCKET_BOUND        0x0002  </span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="coap__io_8h.html#af08709165965a0ce8298c23fbdfc36c1">   57</a></span><span class="preprocessor">#define COAP_SOCKET_CONNECTED    0x0004  </span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a72612f48f50d2b61b974ea51eae20881">   58</a></span><span class="preprocessor">#define COAP_SOCKET_WANT_READ    0x0010  </span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="coap__io_8h.html#ac5bc2439a8bdf2a1722708bca47eb083">   59</a></span><span class="preprocessor">#define COAP_SOCKET_WANT_WRITE   0x0020  </span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a141bbf3cdb1520cf1e1ae85c3bd6ba95">   60</a></span><span class="preprocessor">#define COAP_SOCKET_WANT_ACCEPT  0x0040  </span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="coap__io_8h.html#add6fabbe265b4a46a64d192aa545bf5f">   61</a></span><span class="preprocessor">#define COAP_SOCKET_WANT_CONNECT 0x0080  </span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="coap__io_8h.html#aedf6f7819e71e2c9d27f5b6e40cc7242">   62</a></span><span class="preprocessor">#define COAP_SOCKET_CAN_READ     0x0100  </span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a3f6d0fff4e1a32c87c39cc3b9058020b">   63</a></span><span class="preprocessor">#define COAP_SOCKET_CAN_WRITE    0x0200  </span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a907be6134bbd7d4799966acb3de4e4cf">   64</a></span><span class="preprocessor">#define COAP_SOCKET_CAN_ACCEPT   0x0400  </span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="coap__io_8h.html#ac8c2a11c75a9efd272737eaec3e4ac5c">   65</a></span><span class="preprocessor">#define COAP_SOCKET_CAN_CONNECT  0x0800  </span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a02a86a92a552fb9f6a82ebda631bfe38">   66</a></span><span class="preprocessor">#define COAP_SOCKET_MULTICAST    0x1000  </span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span><span class="keyword">struct </span><a class="code hl_struct" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *<a class="code hl_function" href="coap__io_8h.html#a5022495d015538fd94dff992dddad2f2">coap_malloc_endpoint</a>( <span class="keywordtype">void</span> );</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="keywordtype">void</span> <a class="code hl_function" href="coap__io_8h.html#a376568994d56368c7704b52aaab111a6">coap_mfree_endpoint</a>( <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *ep );</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><a class="code hl_function" href="coap__io_8h.html#a1086276cc42228e6b0b1c72b4f72fa84">coap_socket_connect_udp</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>,</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>                        <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *local_if,</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>                        <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *server,</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>                        <span class="keywordtype">int</span> default_port,</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>                        <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *local_addr,</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>                        <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *remote_addr);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><a class="code hl_function" href="coap__io_8h.html#a9d1deb43ee288c60730c3c8c5df8ec73">coap_socket_bind_udp</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>,</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>                     <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *listen_addr,</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>                     <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *bound_addr );</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><a class="code hl_function" href="coap__io_8h.html#a85ec542c39fda4a6a5346c7801bf0ecd">coap_socket_connect_tcp1</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>,</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>                         <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *local_if,</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>                         <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *server,</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>                         <span class="keywordtype">int</span> default_port,</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>                         <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *local_addr,</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>                         <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *remote_addr);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span><a class="code hl_function" href="coap__io_8h.html#ae591a90d6202a1b7f82b1aa688614520">coap_socket_connect_tcp2</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>                         <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *local_addr,</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>                         <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *remote_addr);</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span> </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><a class="code hl_function" href="coap__io_8h.html#a1c01bf1b3043f11f948e4f3aff1b7823">coap_socket_bind_tcp</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>,</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>                     <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *listen_addr,</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>                     <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *bound_addr);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><a class="code hl_function" href="coap__io_8h.html#aac7a863c20dfbbabaa56cddd2c4109f9">coap_socket_accept_tcp</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *server,</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>                       <a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *new_client,</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>                       <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *local_addr,</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>                       <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *remote_addr);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span><span class="keywordtype">void</span> <a class="code hl_function" href="coap__io_8h.html#a2de382e7795c908d1a376da8c338386d">coap_socket_close</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>ssize_t</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span><a class="code hl_function" href="coap__io_8h.html#a95150e2fecea536ec4b1352f3fae9067">coap_socket_send</a>( <a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>, <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__session__t.html">coap_session_t</a> *session,</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>                  <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <span class="keywordtype">size_t</span> data_len );</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>ssize_t</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span><a class="code hl_function" href="coap__io_8h.html#a53d8fd138fc5bf331c2bf71d72ac4848">coap_socket_write</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>, <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <span class="keywordtype">size_t</span> data_len);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>ssize_t</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span><a class="code hl_function" href="coap__io_8h.html#a2bbd598665f98a1e2f899b475f01618b">coap_socket_read</a>(<a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>, <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <span class="keywordtype">size_t</span> data_len);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span><span class="preprocessor">#ifdef WITH_LWIP</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>ssize_t</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>coap_socket_send_pdu( <a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>, <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__session__t.html">coap_session_t</a> *session,</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>                      <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu );</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span><span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="coap__io_8h.html#a3d4397c1a2ce78e64c19fdcd25256737">coap_socket_strerror</a>( <span class="keywordtype">void</span> );</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a018349f81b487dd77c852e8a97d6985e">  140</a></span>ssize_t <a class="code hl_function" href="coap__io_8h.html#a018349f81b487dd77c852e8a97d6985e">coap_network_send</a>( <a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__session__t.html">coap_session_t</a> *session, <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <span class="keywordtype">size_t</span> datalen );</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span> </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>ssize_t <a class="code hl_function" href="coap__io_8h.html#a76633ff36ad244c1ff2c833948ace8ba">coap_network_read</a>( <a class="code hl_struct" href="structcoap__socket__t.html">coap_socket_t</a> *<a class="code hl_variable" href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">sock</a>, <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a> *packet );</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span><span class="preprocessor">#ifndef coap_mcast_interface</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a20da239bf8ab38350cb845629d6a5f0a">  156</a></span><span class="preprocessor"># define coap_mcast_interface(Local) 0</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span><span class="keywordtype">void</span> <a class="code hl_function" href="coap__io_8h.html#aa01b46bb1254fa9d6d0999e6e0f0d308">coap_packet_get_memmapped</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a> *packet,</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>                               <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> **address,</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>                               <span class="keywordtype">size_t</span> *length);</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span><span class="keywordtype">void</span> <a class="code hl_function" href="coap__io_8h.html#a3e89fd7b48d3f34faced5f524811b3c4">coap_packet_set_addr</a>( <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a> *packet, <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *src,</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span>                           <span class="keyword">const</span> <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> *dst );</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span><span class="preprocessor">#ifdef WITH_LWIP</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span><span class="keyword">struct </span>pbuf *coap_packet_extract_pbuf(<span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a> *packet);</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span> </div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span><span class="preprocessor">#if defined(WITH_LWIP)</span></div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span><span class="comment">/*</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span><span class="comment"> * This is only included in coap_io.h instead of .c in order to be available for</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span><span class="comment"> * sizeof in lwippools.h.</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span><span class="comment"> * Simple carry-over of the incoming pbuf that is later turned into a node.</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span><span class="comment"> *</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span><span class="comment"> * Source address data is currently side-banded via ip_current_dest_addr &amp; co</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span><span class="comment"> * as the packets have limited lifetime anyway.</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="comment"> */</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span><span class="keyword">struct </span><a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a> {</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span>  <span class="keyword">struct </span>pbuf *pbuf;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>  <span class="keyword">const</span> <span class="keyword">struct </span><a class="code hl_struct" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *local_interface;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>  <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> <a class="code hl_variable" href="structcoap__packet__t.html#a51d58ff5bf1ffd31afc66fc6de6c0b87">src</a>;              </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>  <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> <a class="code hl_variable" href="structcoap__packet__t.html#ad6b22cabb2e5f89e03b6c78926ad7de4">dst</a>;              </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>  <span class="keywordtype">int</span> <a class="code hl_variable" href="structcoap__packet__t.html#acf8bba0d42fb690dcf4f07fb8efb12ed">ifindex</a>;                </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span><span class="comment">//  uint16_t srcport;</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>};</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span><span class="preprocessor">#else</span></div>
<div class="foldopen" id="foldopen00196" data-start="{" data-end="};">
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="structcoap__packet__t.html">  196</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a> {</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="structcoap__packet__t.html#a51d58ff5bf1ffd31afc66fc6de6c0b87">  197</a></span>  <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> <a class="code hl_variable" href="structcoap__packet__t.html#a51d58ff5bf1ffd31afc66fc6de6c0b87">src</a>;              </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"><a class="line" href="structcoap__packet__t.html#ad6b22cabb2e5f89e03b6c78926ad7de4">  198</a></span>  <a class="code hl_struct" href="structcoap__address__t.html">coap_address_t</a> <a class="code hl_variable" href="structcoap__packet__t.html#ad6b22cabb2e5f89e03b6c78926ad7de4">dst</a>;              </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="structcoap__packet__t.html#acf8bba0d42fb690dcf4f07fb8efb12ed">  199</a></span>  <span class="keywordtype">int</span> <a class="code hl_variable" href="structcoap__packet__t.html#acf8bba0d42fb690dcf4f07fb8efb12ed">ifindex</a>;                </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="structcoap__packet__t.html#a1e8592de7ccdd35d60aecd8d9ae41c16">  200</a></span>  <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structcoap__packet__t.html#a1e8592de7ccdd35d60aecd8d9ae41c16">length</a>;              </div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"><a class="line" href="structcoap__packet__t.html#a8f29a6a1277ca984070c79a570fedf5d">  201</a></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="structcoap__packet__t.html#a8f29a6a1277ca984070c79a570fedf5d">payload</a>[<a class="code hl_define" href="coap__io_8h.html#a4434bb4fe30115db5ed5c458be4664f5">COAP_RXBUFFER_SIZE</a>]; </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>};</div>
</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a8736d5b461dbe939bc11e68c1439ae0e">  204</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a> <a class="code hl_struct" href="structcoap__packet__t.html">coap_packet_t</a>;</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span> </div>
<div class="foldopen" id="foldopen00206" data-start="{" data-end="};">
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418">  206</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a607bec03e9375a1f176857c48d85e045">  207</a></span>  <a class="code hl_enumvalue" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a607bec03e9375a1f176857c48d85e045">COAP_NACK_TOO_MANY_RETRIES</a>,</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a06f5d92ff204a7c9784c37fe7c580795">  208</a></span>  <a class="code hl_enumvalue" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a06f5d92ff204a7c9784c37fe7c580795">COAP_NACK_NOT_DELIVERABLE</a>,</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a9add7e23f77f49b0c7199b6cda1ea9c0">  209</a></span>  <a class="code hl_enumvalue" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a9add7e23f77f49b0c7199b6cda1ea9c0">COAP_NACK_RST</a>,</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span>  <a class="code hl_enumvalue" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a60a6eebe19b2f6701ed4fcc58886d830">COAP_NACK_TLS_FAILED</a></div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a60a6eebe19b2f6701ed4fcc58886d830">  211</a></span>} <a class="code hl_enumeration" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418">coap_nack_reason_t</a>;</div>
</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span> </div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span><span class="preprocessor">#endif </span><span class="comment">/* COAP_IO_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aaddress_8h_html"><div class="ttname"><a href="address_8h.html">address.h</a></div><div class="ttdoc">Representation of network addresses.</div></div>
<div class="ttc" id="acoap__io_8h_html_a018349f81b487dd77c852e8a97d6985e"><div class="ttname"><a href="coap__io_8h.html#a018349f81b487dd77c852e8a97d6985e">coap_network_send</a></div><div class="ttdeci">ssize_t coap_network_send(coap_socket_t *sock, const struct coap_session_t *session, const uint8_t *data, size_t datalen)</div><div class="ttdoc">Function interface for data transmission.</div></div>
<div class="ttc" id="acoap__io_8h_html_a1086276cc42228e6b0b1c72b4f72fa84"><div class="ttname"><a href="coap__io_8h.html#a1086276cc42228e6b0b1c72b4f72fa84">coap_socket_connect_udp</a></div><div class="ttdeci">int coap_socket_connect_udp(coap_socket_t *sock, const coap_address_t *local_if, const coap_address_t *server, int default_port, coap_address_t *local_addr, coap_address_t *remote_addr)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00527">coap_io.c:527</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a1c01bf1b3043f11f948e4f3aff1b7823"><div class="ttname"><a href="coap__io_8h.html#a1c01bf1b3043f11f948e4f3aff1b7823">coap_socket_bind_tcp</a></div><div class="ttdeci">int coap_socket_bind_tcp(coap_socket_t *sock, const coap_address_t *listen_addr, coap_address_t *bound_addr)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00413">coap_io.c:413</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a2500e6a3ae7b54965f78c2b73b3b5747"><div class="ttname"><a href="coap__io_8h.html#a2500e6a3ae7b54965f78c2b73b3b5747">coap_socket_flags_t</a></div><div class="ttdeci">uint16_t coap_socket_flags_t</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00038">coap_io.h:38</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a2bbd598665f98a1e2f899b475f01618b"><div class="ttname"><a href="coap__io_8h.html#a2bbd598665f98a1e2f899b475f01618b">coap_socket_read</a></div><div class="ttdeci">ssize_t coap_socket_read(coap_socket_t *sock, uint8_t *data, size_t data_len)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00665">coap_io.c:665</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a2de382e7795c908d1a376da8c338386d"><div class="ttname"><a href="coap__io_8h.html#a2de382e7795c908d1a376da8c338386d">coap_socket_close</a></div><div class="ttdeci">void coap_socket_close(coap_socket_t *sock)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00626">coap_io.c:626</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a376568994d56368c7704b52aaab111a6"><div class="ttname"><a href="coap__io_8h.html#a376568994d56368c7704b52aaab111a6">coap_mfree_endpoint</a></div><div class="ttdeci">void coap_mfree_endpoint(struct coap_endpoint_t *ep)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00186">coap_io.c:186</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a3d4397c1a2ce78e64c19fdcd25256737"><div class="ttname"><a href="coap__io_8h.html#a3d4397c1a2ce78e64c19fdcd25256737">coap_socket_strerror</a></div><div class="ttdeci">const char * coap_socket_strerror(void)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l01390">coap_io.c:1390</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a3e89fd7b48d3f34faced5f524811b3c4"><div class="ttname"><a href="coap__io_8h.html#a3e89fd7b48d3f34faced5f524811b3c4">coap_packet_set_addr</a></div><div class="ttdeci">void coap_packet_set_addr(struct coap_packet_t *packet, const coap_address_t *src, const coap_address_t *dst)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00917">coap_io.c:917</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a4434bb4fe30115db5ed5c458be4664f5"><div class="ttname"><a href="coap__io_8h.html#a4434bb4fe30115db5ed5c458be4664f5">COAP_RXBUFFER_SIZE</a></div><div class="ttdeci">#define COAP_RXBUFFER_SIZE</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00019">coap_io.h:19</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a5022495d015538fd94dff992dddad2f2"><div class="ttname"><a href="coap__io_8h.html#a5022495d015538fd94dff992dddad2f2">coap_malloc_endpoint</a></div><div class="ttdeci">struct coap_endpoint_t * coap_malloc_endpoint(void)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00181">coap_io.c:181</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a53d8fd138fc5bf331c2bf71d72ac4848"><div class="ttname"><a href="coap__io_8h.html#a53d8fd138fc5bf331c2bf71d72ac4848">coap_socket_write</a></div><div class="ttdeci">ssize_t coap_socket_write(coap_socket_t *sock, const uint8_t *data, size_t data_len)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00635">coap_io.c:635</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a76633ff36ad244c1ff2c833948ace8ba"><div class="ttname"><a href="coap__io_8h.html#a76633ff36ad244c1ff2c833948ace8ba">coap_network_read</a></div><div class="ttdeci">ssize_t coap_network_read(coap_socket_t *sock, struct coap_packet_t *packet)</div><div class="ttdoc">Function interface for reading data.</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00923">coap_io.c:923</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a7ff2bb32137ca684be5539c156bdc418"><div class="ttname"><a href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418">coap_nack_reason_t</a></div><div class="ttdeci">coap_nack_reason_t</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00206">coap_io.h:206</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a7ff2bb32137ca684be5539c156bdc418a06f5d92ff204a7c9784c37fe7c580795"><div class="ttname"><a href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a06f5d92ff204a7c9784c37fe7c580795">COAP_NACK_NOT_DELIVERABLE</a></div><div class="ttdeci">@ COAP_NACK_NOT_DELIVERABLE</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00208">coap_io.h:208</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a7ff2bb32137ca684be5539c156bdc418a607bec03e9375a1f176857c48d85e045"><div class="ttname"><a href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a607bec03e9375a1f176857c48d85e045">COAP_NACK_TOO_MANY_RETRIES</a></div><div class="ttdeci">@ COAP_NACK_TOO_MANY_RETRIES</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00207">coap_io.h:207</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a7ff2bb32137ca684be5539c156bdc418a60a6eebe19b2f6701ed4fcc58886d830"><div class="ttname"><a href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a60a6eebe19b2f6701ed4fcc58886d830">COAP_NACK_TLS_FAILED</a></div><div class="ttdeci">@ COAP_NACK_TLS_FAILED</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00211">coap_io.h:210</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a7ff2bb32137ca684be5539c156bdc418a9add7e23f77f49b0c7199b6cda1ea9c0"><div class="ttname"><a href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418a9add7e23f77f49b0c7199b6cda1ea9c0">COAP_NACK_RST</a></div><div class="ttdeci">@ COAP_NACK_RST</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00209">coap_io.h:209</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a85ec542c39fda4a6a5346c7801bf0ecd"><div class="ttname"><a href="coap__io_8h.html#a85ec542c39fda4a6a5346c7801bf0ecd">coap_socket_connect_tcp1</a></div><div class="ttdeci">int coap_socket_connect_tcp1(coap_socket_t *sock, const coap_address_t *local_if, const coap_address_t *server, int default_port, coap_address_t *local_addr, coap_address_t *remote_addr)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00268">coap_io.c:268</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a95150e2fecea536ec4b1352f3fae9067"><div class="ttname"><a href="coap__io_8h.html#a95150e2fecea536ec4b1352f3fae9067">coap_socket_send</a></div><div class="ttdeci">ssize_t coap_socket_send(coap_socket_t *sock, struct coap_session_t *session, const uint8_t *data, size_t data_len)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l01396">coap_io.c:1396</a></div></div>
<div class="ttc" id="acoap__io_8h_html_a9d1deb43ee288c60730c3c8c5df8ec73"><div class="ttname"><a href="coap__io_8h.html#a9d1deb43ee288c60730c3c8c5df8ec73">coap_socket_bind_udp</a></div><div class="ttdeci">int coap_socket_bind_udp(coap_socket_t *sock, const coap_address_t *listen_addr, coap_address_t *bound_addr)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00192">coap_io.c:192</a></div></div>
<div class="ttc" id="acoap__io_8h_html_aa01b46bb1254fa9d6d0999e6e0f0d308"><div class="ttname"><a href="coap__io_8h.html#aa01b46bb1254fa9d6d0999e6e0f0d308">coap_packet_get_memmapped</a></div><div class="ttdeci">void coap_packet_get_memmapped(struct coap_packet_t *packet, unsigned char **address, size_t *length)</div><div class="ttdoc">Given a packet, set msg and msg_len to an address and length of the packet's data in memory.</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00912">coap_io.c:912</a></div></div>
<div class="ttc" id="acoap__io_8h_html_aac7a863c20dfbbabaa56cddd2c4109f9"><div class="ttname"><a href="coap__io_8h.html#aac7a863c20dfbbabaa56cddd2c4109f9">coap_socket_accept_tcp</a></div><div class="ttdeci">int coap_socket_accept_tcp(coap_socket_t *server, coap_socket_t *new_client, coap_address_t *local_addr, coap_address_t *remote_addr)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00490">coap_io.c:490</a></div></div>
<div class="ttc" id="acoap__io_8h_html_acbbc3c3a8f035dd8078f47cfb78d91b9"><div class="ttname"><a href="coap__io_8h.html#acbbc3c3a8f035dd8078f47cfb78d91b9">coap_fd_t</a></div><div class="ttdeci">int coap_fd_t</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00028">coap_io.h:28</a></div></div>
<div class="ttc" id="acoap__io_8h_html_ae591a90d6202a1b7f82b1aa688614520"><div class="ttname"><a href="coap__io_8h.html#ae591a90d6202a1b7f82b1aa688614520">coap_socket_connect_tcp2</a></div><div class="ttdeci">int coap_socket_connect_tcp2(coap_socket_t *sock, coap_address_t *local_addr, coap_address_t *remote_addr)</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8c_source.html#l00373">coap_io.c:373</a></div></div>
<div class="ttc" id="astructcoap__address__t_html"><div class="ttname"><a href="structcoap__address__t.html">coap_address_t</a></div><div class="ttdoc">multi-purpose address abstraction</div><div class="ttdef"><b>Definition</b> <a href="address_8h_source.html#l00062">address.h:62</a></div></div>
<div class="ttc" id="astructcoap__endpoint__t_html"><div class="ttname"><a href="structcoap__endpoint__t.html">coap_endpoint_t</a></div><div class="ttdoc">Abstraction of virtual endpoint that can be attached to coap_context_t.</div><div class="ttdef"><b>Definition</b> <a href="coap__session_8h_source.html#l00301">coap_session.h:301</a></div></div>
<div class="ttc" id="astructcoap__endpoint__t_html_ad0d9d4c7a4ff91f4e5149ea82cc02a38"><div class="ttname"><a href="structcoap__endpoint__t.html#ad0d9d4c7a4ff91f4e5149ea82cc02a38">coap_endpoint_t::sock</a></div><div class="ttdeci">coap_socket_t sock</div><div class="ttdoc">socket object for the interface, if any</div><div class="ttdef"><b>Definition</b> <a href="coap__session_8h_source.html#l00306">coap_session.h:306</a></div></div>
<div class="ttc" id="astructcoap__packet__t_html"><div class="ttname"><a href="structcoap__packet__t.html">coap_packet_t</a></div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00196">coap_io.h:196</a></div></div>
<div class="ttc" id="astructcoap__packet__t_html_a1e8592de7ccdd35d60aecd8d9ae41c16"><div class="ttname"><a href="structcoap__packet__t.html#a1e8592de7ccdd35d60aecd8d9ae41c16">coap_packet_t::length</a></div><div class="ttdeci">size_t length</div><div class="ttdoc">length of payload</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00200">coap_io.h:200</a></div></div>
<div class="ttc" id="astructcoap__packet__t_html_a51d58ff5bf1ffd31afc66fc6de6c0b87"><div class="ttname"><a href="structcoap__packet__t.html#a51d58ff5bf1ffd31afc66fc6de6c0b87">coap_packet_t::src</a></div><div class="ttdeci">coap_address_t src</div><div class="ttdoc">the packet's source address</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00197">coap_io.h:197</a></div></div>
<div class="ttc" id="astructcoap__packet__t_html_a8f29a6a1277ca984070c79a570fedf5d"><div class="ttname"><a href="structcoap__packet__t.html#a8f29a6a1277ca984070c79a570fedf5d">coap_packet_t::payload</a></div><div class="ttdeci">unsigned char payload[COAP_RXBUFFER_SIZE]</div><div class="ttdoc">payload</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00201">coap_io.h:201</a></div></div>
<div class="ttc" id="astructcoap__packet__t_html_acf8bba0d42fb690dcf4f07fb8efb12ed"><div class="ttname"><a href="structcoap__packet__t.html#acf8bba0d42fb690dcf4f07fb8efb12ed">coap_packet_t::ifindex</a></div><div class="ttdeci">int ifindex</div><div class="ttdoc">the interface index</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00199">coap_io.h:199</a></div></div>
<div class="ttc" id="astructcoap__packet__t_html_ad6b22cabb2e5f89e03b6c78926ad7de4"><div class="ttname"><a href="structcoap__packet__t.html#ad6b22cabb2e5f89e03b6c78926ad7de4">coap_packet_t::dst</a></div><div class="ttdeci">coap_address_t dst</div><div class="ttdoc">the packet's destination address</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00198">coap_io.h:198</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html"><div class="ttname"><a href="structcoap__pdu__t.html">coap_pdu_t</a></div><div class="ttdoc">structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00285">pdu.h:285</a></div></div>
<div class="ttc" id="astructcoap__session__t_html"><div class="ttname"><a href="structcoap__session__t.html">coap_session_t</a></div><div class="ttdef"><b>Definition</b> <a href="coap__session_8h_source.html#l00056">coap_session.h:56</a></div></div>
<div class="ttc" id="astructcoap__socket__t_html"><div class="ttname"><a href="structcoap__socket__t.html">coap_socket_t</a></div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00040">coap_io.h:40</a></div></div>
<div class="ttc" id="astructcoap__socket__t_html_a8b3fa70d071fdf5815bc33671b7c4f76"><div class="ttname"><a href="structcoap__socket__t.html#a8b3fa70d071fdf5815bc33671b7c4f76">coap_socket_t::fd</a></div><div class="ttdeci">coap_fd_t fd</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00046">coap_io.h:46</a></div></div>
<div class="ttc" id="astructcoap__socket__t_html_afc857e7bf0427e0d08e2be5604bc5516"><div class="ttname"><a href="structcoap__socket__t.html#afc857e7bf0427e0d08e2be5604bc5516">coap_socket_t::flags</a></div><div class="ttdeci">coap_socket_flags_t flags</div><div class="ttdef"><b>Definition</b> <a href="coap__io_8h_source.html#l00048">coap_io.h:48</a></div></div>
<div class="ttc" id="authash_8h_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition</b> <a href="uthash_8h_source.html#l00079">uthash.h:79</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_a14d23a24002734ac2a3b997119f008e.html">coap2</a></li><li class="navelem"><a class="el" href="coap__io_8h.html">coap_io.h</a></li>
    <li class="footer">Generated on Fri Dec 27 2024 09:57:44 for libcoap by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
  </ul>
</div>
</body>
</html>
